package day03;

public class OperDemo5 {
    public static void main(String[] args) {
        //演示字符串连接
        int age = 38;
        System.out.println("age="); //age=
        System.out.println(age); //38
        System.out.println("age="+age); //age=38
        System.out.println("我的年龄是"+age); //我的年龄是38
        System.out.println("我今年"+age+"岁了"); //我今年38岁了
        String name = "WKJ";
        System.out.println("name="+name); //name=WKJ
        System.out.println("大家好，我叫"+name); //大家好，我叫WKJ
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了"); //大家好，我叫WKJ，今年38岁了
        //演示同化作用
        System.out.println(10+20+""+30); //3030---------String
        System.out.println(""+10+20+30); //102030-------String
        System.out.println(10+20+30+""); //60-----------String
    }
}
